#FLAGS = -std=c99 -Wall -O1
#FLAGS = -std=c99 -Wall -O1 -g
FLAGS = -std=c99 -Wall -O1 -ggdb

all: 1.childTest 2.orphanTest 3.loopFork 4.createNChildren 5.createNDescendants 6.zombie 3.createProcesses 

1.childTest: 1.childTest.c
	gcc ${FLAGS} -o 1.childTest 1.childTest.c

2.orphanTest: 2.orphanTest.c
	gcc ${FLAGS} -o 2.orphanTest 2.orphanTest.c

3.loopFork: 3.loopFork.c
	gcc ${FLAGS} 3.loopFork.c -o 3.loopFork

3.createProcesses: 3.createProcesses.c
	gcc ${FLAGS} 3.createProcesses.c -o 3.createProcesses

4.createNChildren: 4.createNChildren.c
	gcc ${FLAGS} 4.createNChildren.c -o 4.createNChildren

5.createNDescendants: 5.createNDescendants.c
	gcc ${FLAGS} 5.createNDescendants.c -o 5.createNDescendants

6.zombie: 6.zombie.c
	gcc ${FLAGS} 6.zombie.c -o 6.zombie

#createProcesses: createProcesses.c
#	gcc ${FLAGS} createProcesses.c -o createProcesses


clean:	
	rm -f 1.childTest 2.orphanTest 3.loopFork 4.createNChildren 5.createNDescendants 6.zombie createProcesses 
